c1 = optimvar('c1');
c2 = optimvar('c2');
l1 = optimvar('l1');
l2 = optimvar('l2');

x0.c1=0;
x0.c2=0;
x0.l1=0;
x0.l2=0;
X=exp(-t);

% c1=1;l1=2;
diffun = c1*(exp(-t*l1));

% diffexpr = sum((diffun -y).^2);
% ssqprob = optimproblem('Objective',diffexpr);
% [sol,fval] = solve(ssqprob,x0);
% resp = evaluate(diffun,sol);
% plot(t,y,'ro',t,resp)
% axis([0 2 0 10])
% title()
plot(t,diffun)